@keyframes hover-color {
    from {
        border-color: #c0c0c0; }
    to {
        border-color: #b9b9b9; } }

.magic-radio,
.magic-checkbox {
    position: absolute;
    display: none; }

.magic-radio[disabled],
.magic-checkbox[disabled] {
    cursor: not-allowed; }

.magic-radio + label {
    margin-left: -25px; /* radio一列对齐 */
}
.magic-radio + label,
.magic-checkbox + label {
    position: relative;
    display: block;
    padding-left: 30px;
    cursor: pointer;
    vertical-align: middle;
    display: initial; /* 调整checkbox、radio和文字对齐一排 */
}
.magic-radio + label:hover:before,
.magic-checkbox + label:hover:before {
    animation-duration: 0.4s;
    animation-fill-mode: both;
    animation-name: hover-color; }
.magic-radio + label:before,
.magic-checkbox + label:before {
    position: absolute;
    top: 2px;
    left: 7px;
    display: inline-block;
    width: 14px;
    height: 14px;
    content: '';
    border: 1px solid silver;
}
.magic-radio + label:after,
.magic-checkbox + label:after {
    position: absolute;
    display: none;
    content: ''; }

.magic-radio[disabled] + label,
.magic-checkbox[disabled] + label {
    cursor: not-allowed;
    color: #e4e4e4; }
.magic-radio[disabled] + label:hover, .magic-radio[disabled] + label:before, .magic-radio[disabled] + label:after,
.magic-checkbox[disabled] + label:hover,
.magic-checkbox[disabled] + label:before,
.magic-checkbox[disabled] + label:after {
    cursor: not-allowed; }
/* .magic-radio[disabled] + label:hover:before,
.magic-checkbox[disabled] + label:hover:before {
    border: 1px solid #e4e4e4;
    animation-name: none;  } 边线hover变色效果 */
.magic-radio[disabled] + label:before,
.magic-checkbox[disabled] + label:before {
    border-color: #e4e4e4; }
.magic-radio:checked + label:before,
.magic-checkbox:checked + label:before {
    animation-name: none; }

.magic-radio:checked + label:after,
.magic-checkbox:checked + label:after {
    display: block; }

.magic-radio + label:before {
    border-radius: 50%; }

.magic-radio + label:after {
    top: 5px;
    left: 10px; /* radio圆点位置 */
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999; /* radio圆点颜色 */
}

.magic-radio:checked + label:before {
    border: 1px solid #b9b9b9; }

/* .magic-radio:checked[disabled] + label:before {
    border: 1px solid #eee; } */


.magic-checkbox + label:after {
    top: 2px;
    left: 11px;/* 对勾位置 */
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 6px;
    height: 12px;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    border-width: 2px;
    border-style: solid;
    border-color: #555; /* 对勾颜色 */
    border-top: 0;
    border-left: 0; }
.magic-checkbox:checked + label:before {
    border-color: #b9b9b9;
    /* background: #b9b9b9;  对勾后面的背景*/}

/* 不可选时状态 */
.magic-checkbox[disabled] + label:before {
    border-color: #BBB9B9;
    /* background: #eee;  对勾后面的背景 */ }
.magic-checkbox:checked[disabled] + label:after {
    border-color: #BBB9B9;}
.magic-radio[disabled] + label:before {
    border-color: #BBB9B9;}
.magic-radio:checked[disabled] + label:after {
    background: #BBB9B9; }
/* 部分选中 */
.magic-checkbox[disabled] + .half:after {
    background: #BBB9B9; }
.magic-checkbox + .half:after {
    display: block;
    top: 4px;
    left: 9px;
    width: 10px;
    height: 10px;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    border: 0 none;
    background-color: #999;  }